﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using MobilePulginBase;
using MyFirstPlugin.Properties;

namespace MyFirstPlugin
{
    public class MyFirstPlugin : IPlugin
    {
        private static int _version = 1;
        private static string _desp = "这是一个插件实例";
        private static string _caption = "我的插件";
        private static int _idx = 0;

        public MyFirstPlugin()
        {
        }
        #region IPlugin 成员

        public int Version
        {
            get { return _version; }
        }

        public string Description
        {
            get { return _desp; }
        }

        public string Caption
        {
            get { return _caption; }
        }

        public int Index
        {
            get
            {
                return _idx;
            }
            set
            {
                _idx = value;
            }
        }

        public System.Drawing.Bitmap Icon
        {
            get { return MyPluginRes.sysinfo; }
        }

        public string Name
        {
            get { return "MyFirstPlugin"; }
        }

        public int Required
        {
            get { return 1; }
        }

        public string Parent
        {
            get { return ""; }
        }

        public void ShowUIForm(System.Windows.Forms.Form owner, System.Windows.Forms.Form parent)
        {
            FrmPluginDialog dlgPlugin = new FrmPluginDialog();
            dlgPlugin.Owner = owner;
            dlgPlugin.Parent = parent;
            dlgPlugin.ShowDialog();
            dlgPlugin.Close();
            dlgPlugin.Dispose();
        }

        public void ShowUIForm(System.Windows.Forms.Form owner, System.Windows.Forms.Form parent, object val)
        {
            ShowUIForm(owner, parent);
        }

        #endregion

        #region IDisposable 成员

        public void Dispose()
        {
           
        }

        #endregion
    }
}
